/*
 * 
 *  jiangcheng
 *  
 */

package com.uhaou.web.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;
import org.apache.commons.lang.StringUtils;

import com.uhaou.common.base.*;
import com.uhaou.common.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.uhaou.web.model.*;
import com.uhaou.web.dao.*;
import com.uhaou.web.service.*;
import com.uhaou.web.vo.query.*;

/**
 * @author  jiangcheng
 * @version 1.0
 * @since 1.0
 */


public class WebMember extends BaseEntity implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "WebMember";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_LOGIN_NAME = "loginName";
	public static final String ALIAS_HEAD_IMG = "headImg";
	public static final String ALIAS_NICK_NAME = "nickName";
	public static final String ALIAS_LAST_NAME = "lastName";
	public static final String ALIAS_FIRST_NAME = "firstName";
	public static final String ALIAS_ENG_NAME = "engName";
	public static final String ALIAS_SEX = "sex";
	public static final String ALIAS_POSITION = "position";
	public static final String ALIAS_CMP_NAME = "cmpName";
	public static final String ALIAS_CMP_WEB = "cmpWeb";
	public static final String ALIAS_MOBILE = "mobile";
	public static final String ALIAS_PHONE = "phone";
	public static final String ALIAS_BIRTH_YEAR = "birthYear";
	public static final String ALIAS_BIRTH_MON = "birthMon";
	public static final String ALIAS_BIRTH_DAY = "birthDay";
	public static final String ALIAS_EMAIL = "email";
	public static final String ALIAS_BLOBS = "blobs";
	public static final String ALIAS_MSN = "msn";
	public static final String ALIAS_QQ = "qq";
	public static final String ALIAS_MEMO = "memo";
	public static final String ALIAS_REMARK = "remark";
	public static final String ALIAS_STATE = "state";
	public static final String ALIAS_LAST_DATE = "lastDate";
	public static final String ALIAS_ONLINES = "onlines";
	public static final String ALIAS_CREATOR = "creator";
	public static final String ALIAS_ORG = "org";
	public static final String ALIAS_NUMS = "nums";
	public static final String ALIAS_PE_VALUE = "peValue";
	public static final String ALIAS_PE_MEMBER = "peMember";
	
	//date formats
	public static final String FORMAT_LAST_DATE = DATE_FORMAT;
	public static final String FORMAT_CREATOR = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	@Length(max=32)
	private java.lang.String id;
	@Length(max=100)
	private java.lang.String loginName;
	@Length(max=100)
	private java.lang.String headImg;
	@Length(max=100)
	private java.lang.String nickName;
	@Length(max=100)
	private java.lang.String lastName;
	@Length(max=30)
	private java.lang.String firstName;
	@Length(max=30)
	private java.lang.String engName;
	@Length(max=2)
	private java.lang.String sex;
	@Length(max=100)
	private java.lang.String position;
	@Length(max=100)
	private java.lang.String cmpName;
	@Length(max=100)
	private java.lang.String cmpWeb;
	@Length(max=30)
	private java.lang.String mobile;
	@Length(max=30)
	private java.lang.String phone;
	@Length(max=30)
	private java.lang.String birthYear;
	@Length(max=30)
	private java.lang.String birthMon;
	@Length(max=30)
	private java.lang.String birthDay;
	@Length(max=30)
	private java.lang.String email;
	@Length(max=100)
	private java.lang.String blobs;
	@Length(max=100)
	private java.lang.String msn;
	@Length(max=30)
	private java.lang.String qq;
	@Length(max=500)
	private java.lang.String memo;
	@Length(max=500)
	private java.lang.String remark;
	@Length(max=2)
	private java.lang.String state;
	
	private java.util.Date lastDate;
	@Length(max=2)
	private java.lang.String onlines;
	
	private java.util.Date creator;
	@Length(max=30)
	private java.lang.String org;
	
	private Long nums;
	
	private Long peValue;
	@Length(max=32)
	private java.lang.String peMember;
	//columns END

	public WebMember(){
	}

	public WebMember(
		java.lang.String id
	){
		this.id = id;
	}

	public void setId(java.lang.String value) {
		this.id = value;
	}
	
	public java.lang.String getId() {
		return this.id;
	}
	public void setLoginName(java.lang.String value) {
		this.loginName = value;
	}
	
	public java.lang.String getLoginName() {
		return this.loginName;
	}
	public void setHeadImg(java.lang.String value) {
		this.headImg = value;
	}
	
	public java.lang.String getHeadImg() {
		return this.headImg;
	}
	public void setNickName(java.lang.String value) {
		this.nickName = value;
	}
	
	public java.lang.String getNickName() {
		return this.nickName;
	}
	public void setLastName(java.lang.String value) {
		this.lastName = value;
	}
	
	public java.lang.String getLastName() {
		return this.lastName;
	}
	public void setFirstName(java.lang.String value) {
		this.firstName = value;
	}
	
	public java.lang.String getFirstName() {
		return this.firstName;
	}
	public void setEngName(java.lang.String value) {
		this.engName = value;
	}
	
	public java.lang.String getEngName() {
		return this.engName;
	}
	public void setSex(java.lang.String value) {
		this.sex = value;
	}
	
	public java.lang.String getSex() {
		return this.sex;
	}
	public void setPosition(java.lang.String value) {
		this.position = value;
	}
	
	public java.lang.String getPosition() {
		return this.position;
	}
	public void setCmpName(java.lang.String value) {
		this.cmpName = value;
	}
	
	public java.lang.String getCmpName() {
		return this.cmpName;
	}
	public void setCmpWeb(java.lang.String value) {
		this.cmpWeb = value;
	}
	
	public java.lang.String getCmpWeb() {
		return this.cmpWeb;
	}
	public void setMobile(java.lang.String value) {
		this.mobile = value;
	}
	
	public java.lang.String getMobile() {
		return this.mobile;
	}
	public void setPhone(java.lang.String value) {
		this.phone = value;
	}
	
	public java.lang.String getPhone() {
		return this.phone;
	}
	public void setBirthYear(java.lang.String value) {
		this.birthYear = value;
	}
	
	public java.lang.String getBirthYear() {
		return this.birthYear;
	}
	public void setBirthMon(java.lang.String value) {
		this.birthMon = value;
	}
	
	public java.lang.String getBirthMon() {
		return this.birthMon;
	}
	public void setBirthDay(java.lang.String value) {
		this.birthDay = value;
	}
	
	public java.lang.String getBirthDay() {
		return this.birthDay;
	}
	public void setEmail(java.lang.String value) {
		this.email = value;
	}
	
	public java.lang.String getEmail() {
		return this.email;
	}
	public void setBlobs(java.lang.String value) {
		this.blobs = value;
	}
	
	public java.lang.String getBlobs() {
		return this.blobs;
	}
	public void setMsn(java.lang.String value) {
		this.msn = value;
	}
	
	public java.lang.String getMsn() {
		return this.msn;
	}
	public void setQq(java.lang.String value) {
		this.qq = value;
	}
	
	public java.lang.String getQq() {
		return this.qq;
	}
	public void setMemo(java.lang.String value) {
		this.memo = value;
	}
	
	public java.lang.String getMemo() {
		return this.memo;
	}
	public void setRemark(java.lang.String value) {
		this.remark = value;
	}
	
	public java.lang.String getRemark() {
		return this.remark;
	}
	public void setState(java.lang.String value) {
		this.state = value;
	}
	
	public java.lang.String getState() {
		return this.state;
	}
	public String getLastDateString() {
		return DateConvertUtils.format(getLastDate(), FORMAT_LAST_DATE);
	}
	public void setLastDateString(String value) {
		setLastDate(DateConvertUtils.parse(value, FORMAT_LAST_DATE,java.util.Date.class));
	}
	
	public void setLastDate(java.util.Date value) {
		this.lastDate = value;
	}
	
	public java.util.Date getLastDate() {
		return this.lastDate;
	}
	public void setOnlines(java.lang.String value) {
		this.onlines = value;
	}
	
	public java.lang.String getOnlines() {
		return this.onlines;
	}
	public String getCreatorString() {
		return DateConvertUtils.format(getCreator(), FORMAT_CREATOR);
	}
	public void setCreatorString(String value) {
		setCreator(DateConvertUtils.parse(value, FORMAT_CREATOR,java.util.Date.class));
	}
	
	public void setCreator(java.util.Date value) {
		this.creator = value;
	}
	
	public java.util.Date getCreator() {
		return this.creator;
	}
	public void setOrg(java.lang.String value) {
		this.org = value;
	}
	
	public java.lang.String getOrg() {
		return this.org;
	}
	public void setNums(Long value) {
		this.nums = value;
	}
	
	public Long getNums() {
		return this.nums;
	}
	public void setPeValue(Long value) {
		this.peValue = value;
	}
	
	public Long getPeValue() {
		return this.peValue;
	}
	public void setPeMember(java.lang.String value) {
		this.peMember = value;
	}
	
	public java.lang.String getPeMember() {
		return this.peMember;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("LoginName",getLoginName())
			.append("HeadImg",getHeadImg())
			.append("NickName",getNickName())
			.append("LastName",getLastName())
			.append("FirstName",getFirstName())
			.append("EngName",getEngName())
			.append("Sex",getSex())
			.append("Position",getPosition())
			.append("CmpName",getCmpName())
			.append("CmpWeb",getCmpWeb())
			.append("Mobile",getMobile())
			.append("Phone",getPhone())
			.append("BirthYear",getBirthYear())
			.append("BirthMon",getBirthMon())
			.append("BirthDay",getBirthDay())
			.append("Email",getEmail())
			.append("Blobs",getBlobs())
			.append("Msn",getMsn())
			.append("Qq",getQq())
			.append("Memo",getMemo())
			.append("Remark",getRemark())
			.append("State",getState())
			.append("LastDate",getLastDate())
			.append("Onlines",getOnlines())
			.append("Creator",getCreator())
			.append("Org",getOrg())
			.append("Nums",getNums())
			.append("PeValue",getPeValue())
			.append("PeMember",getPeMember())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof WebMember == false) return false;
		if(this == obj) return true;
		WebMember other = (WebMember)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

